import http from '@/util/request'

export default {
    upload: (data: any) =>
        http.upload('/fastdfs-boot/upload', {
            filePath: data,
            name: 'multipartFile',
            custom: {
                showLoading: true,
                loadingText: '上传中...',
                loadingMask: true,
            },
        }),
    //根据域名获取租户信息
    getTenantByDomainArray: (data: any) =>
        http.post(
            '/basics-boot/jurisdiction/getTenantByDomainArray',
            { ...data },
            {
                custom: {
                    ignoreTenantId: true,
                },
            }
        ),
    // 20211118前端通用字典接口（列表）
    getDict: (data: string) => http.post('/basics-boot/dictionaries/tenant/allFieldsByKey', { key: data }),
    protocol: (data: string) => http.post('/basics-boot/richText/privacyOrContractByTenant', { type: data }),
}
